/*************************************************************************
 * @file: kef.h
 * @date: 01/04/2012
 * TOPOL v1_0 - (c)copyright 2012 TEC/UFF
 *************************************************************************
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 ************************************************************************/

#ifndef _KEF
#define _KEF

// includes
//----------
#include "euleroperator.h"

// forward declarations
//----------------------
class HalfEdge;
class HEDModel;


/*!
 * CLASS
 * KEF
 * 
 * This class implements the Topological Euler Operator: MVSE, that means,
 * Make Vertex and Split Edge.
 * 
 * @author Andre Pereira (andremaues@id.uff.br)
 * @version 1.0.0
 * @see EulerOperator
 */
class KEF : public EulerOperator
{

public:

  ////////////////////////////////////////////////
  ///  Constructor and Destructor Declaration  ///
  ////////////////////////////////////////////////

  /**
   * @brief Creates the Topological Euler Operator KEF
   * @param _edge is the edge to be split
   * @param _v is the vertex to be created
   * @param _x is the first coordinate of the point
   * @param _y is the second coordinate of the point
   * @param _z is the third coordinate of the point
   */
  KEF( HEDModel& _model, int _s, int _v1, int _v2, int _fno );
  KEF( HalfEdge* _he1, HalfEdge* _he2 );

  ////////////////////////////////////
  ///  PUBLIC Methods Declaration  ///
  ////////////////////////////////////
		
  /**
   * @brief Asks to execute the current topological operator
   */
  void execute(); 
		
  /**
   * @brief Asks to execute the inverse topological operator
   */
  void unExecute();


private:

  ////////////////////////////////
  ///  Attributes Declaration  ///
  ////////////////////////////////

  /** @brief xxxxxxxxxxxxx */
  HalfEdge* m_he1;

  /** @brief xxxxxxxxxxxx */
  HalfEdge* m_he2;

};

#endif
